package com.sghj.SysPermission.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.DecimalMin;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author xrx
 * @since 2022-02-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_menu")
@ApiModel(value="SysMenu对象", description="")
public class SysMenu implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "菜单ID 主键 自增长 非空")
    @TableId(value = "MenuId", type = IdType.AUTO)
    private Integer MenuId;

    @ApiModelProperty(value = "菜单名称")
    @TableField("MenuName")
    private String MenuName;

    @ApiModelProperty(value = "菜单URL")
    @TableField("MenuUrl")
    private String MenuUrl;

    @ApiModelProperty(value = "菜单编码")
    @TableField("MenuNum")
    private String MenuNum;

    @ApiModelProperty(value = "父节点ID")
    @TableField("ParentId")
    private Integer ParentId;

    @ApiModelProperty(value = "用户许可")
    @TableField("Permission")
    private String Permission;

    @ApiModelProperty(value = "显示顺序")
    @TableField("DisplayOrder")
    @DecimalMin(value = "0",message = "输入必须为大于0的数字")
    private Integer DisplayOrder;

    @ApiModelProperty(value = "菜单类型")
    @TableField("Type")
    private String Type;

    @ApiModelProperty(value = "菜单图标")
    @TableField("menu_icon")
    private String menuIcon;

    @ApiModelProperty(value = "是否删除")
    @TableField("is_delete")
    private String isDelete;

    @ApiModelProperty(value = "备注")
    @TableField("Memo2")
    private String Memo2;

    private List<SysMenu> children;
}
